﻿using System;
using GeoAPI.Geometries;
using YJKGridTopologyCal.Geometries;

namespace YJKGridTopologyCal.Index.Chain
{
	public class MonotoneChainOverlapAction
	{
		public virtual void Overlap(MonotoneChain mc1, int start1, MonotoneChain mc2, int start2)
		{
			mc1.GetLineSegment(start1, ref this.overlapSeg1);
			mc2.GetLineSegment(start2, ref this.overlapSeg2);
			this.Overlap(this.overlapSeg1, this.overlapSeg2);
		}

		public virtual void Overlap(LineSegment seg1, LineSegment seg2)
		{
		}

		public Envelope TempEnv1 = new Envelope();

		public Envelope TempEnv2 = new Envelope();

		protected LineSegment overlapSeg1 = new LineSegment();

		protected LineSegment overlapSeg2 = new LineSegment();
	}
}
